package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @ClassName: Video
 * @Description: TODO
 * @Author: 86139
 * @Date: 2021/9/12 21:54
 * @Version:1.0
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("video")
public class Video {
    public Video(Integer id, Integer uid, String vUrl, String vCoverUrl, String vCoverGifUrl, String introduce, String playAmount, String vHead, Integer vState, Integer auditState, Date vTime, String remark, String auditor) {
        this.id = id;
        this.uid = uid;
        this.vUrl = vUrl;
        this.vCoverUrl = vCoverUrl;
        this.vCoverGifUrl = vCoverGifUrl;
        this.introduce = introduce;
        this.playAmount = playAmount;
        this.vHead = vHead;
        this.vState = vState;
        this.auditState = auditState;
        this.vTime = vTime;
        this.remark = remark;
        this.auditor = auditor;
    }

    @Override
    public String toString() {
        return "Video{" +
                "id=" + id +
                ", uid=" + uid +
                ", vUrl='" + vUrl + '\'' +
                ", vCoverUrl='" + vCoverUrl + '\'' +
                ", vCoverGifUrl='" + vCoverGifUrl + '\'' +
                ", introduce='" + introduce + '\'' +
                ", playAmount='" + playAmount + '\'' +
                ", vHead='" + vHead + '\'' +
                ", vState=" + vState +
                ", auditState=" + auditState +
                ", vTime=" + vTime +
                ", remark='" + remark + '\'' +
                ", auditor='" + auditor + '\'' +
                '}';
    }

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户外键
     */
    @TableField("uid")
    private Integer uid;

    /**
     * 作品路径
     */
    @TableField("v_url")
    private String vUrl;

    /**
     * 作品封面
     */
    @TableField("v_cover_url")
    private String vCoverUrl;

    /**
     * 作品封面动图
     */
    @TableField("v_cover_gif_url")
    private String vCoverGifUrl;

    /**
     * 文案
     */
    @TableField("introduce")
    private String introduce;

    /**
     * 播放量
     */
    @TableField("play_amount")
    private String playAmount;

    /**
     * 作品热度  默认500  审核的时候优质作品加热度  劣质作品减热度
     */
    @TableField("v_head")
    private String vHead;

    /**
     * 作品状态 0 公开  1私密
     */
    @TableField("v_state")
    private Integer vState;

    /**
     * 审核状态 0是等待审核  1是审核通过 2是审核失败
     */
    @TableField("audit_state")
    private Integer auditState;

    /**
     * 发布时间
     */
    @JsonFormat(pattern = " yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("v_time")
    private Date vTime;

    /**
     * 备注 审核失败时写入原因
     */
    @TableField("remark")
    private String remark;
    /**
     * 审核人
     */
    @TableField("auditor")
    private String auditor;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getvUrl() {
        return vUrl;
    }

    public void setvUrl(String vUrl) {
        this.vUrl = vUrl;
    }

    public String getvCoverUrl() {
        return vCoverUrl;
    }

    public void setvCoverUrl(String vCoverUrl) {
        this.vCoverUrl = vCoverUrl;
    }

    public String getvCoverGifUrl() {
        return vCoverGifUrl;
    }

    public void setvCoverGifUrl(String vCoverGifUrl) {
        this.vCoverGifUrl = vCoverGifUrl;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getPlayAmount() {
        return playAmount;
    }

    public void setPlayAmount(String playAmount) {
        this.playAmount = playAmount;
    }

    public String getvHead() {
        return vHead;
    }

    public void setvHead(String vHead) {
        this.vHead = vHead;
    }

    public Integer getvState() {
        return vState;
    }

    public void setvState(Integer vState) {
        this.vState = vState;
    }

    public Integer getAuditState() {
        return auditState;
    }

    public void setAuditState(Integer auditState) {
        this.auditState = auditState;
    }

    public Date getvTime() {
        return vTime;
    }

    public void setvTime(Date vTime) {
        this.vTime = vTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAuditor() {
        return auditor;
    }

    public void setAuditor(String auditor) {
        this.auditor = auditor;
    }
}
